import request from '@/utils/request'

// 新增时, 获取预定的记录id
export function getPreId(data,success,fail) {
	return request({
		url: '/suppliers/suppliers/geiShopId',
		method: 'get',
		data,
		success,
		fail
	})
}

// 查询商铺基本信息列表
export function listSuppliers(query) {
  return request({
    url: '/suppliers/suppliers/list',
    method: 'get',
    params: query
  })
}

// 查询商铺基本信息详细
export function getSuppliers(id) {
  return request({
    url: '/suppliers/suppliers/' + id,
    method: 'get'
  })
}

// 新增商铺基本信息
export function addSuppliers(data) {
  return request({
    url: '/suppliers/suppliers',
    method: 'post',
    data: data
  })
}

// 修改商铺基本信息
export function updateSuppliers(data) {
  return request({
    url: '/suppliers/suppliers',
    method: 'put',
    data: data
  })
}

// 删除商铺基本信息
export function delSuppliers(id) {
  return request({
    url: '/suppliers/suppliers/' + id,
    method: 'delete'
  })
}

// 导出商铺基本信息
export function exportSuppliers(query) {
  return request({
    url: '/suppliers/suppliers/export',
    method: 'get',
    params: query
  })
}
